<?php

/**
 * HmgSolution form base class.
 *
 * @method HmgSolution getObject() Returns the current form's model object
 *
 * @package    helpmeguru
 * @subpackage form
 * @author     Nicolò Pignatelli
 * @version    SVN: $Id: sfPropelFormGeneratedTemplate.php 24171 2009-11-19 16:37:50Z Kris.Wallsmith $
 */
abstract class BaseHmgSolutionForm extends BaseFormPropel
{
  public function setup()
  {
    $this->setWidgets(array(
      'id'          => new sfWidgetFormInputHidden(),
      'problem_id'  => new sfWidgetFormPropelChoice(array('model' => 'HmgProblem', 'add_empty' => false)),
      'description' => new sfWidgetFormTextarea(),
      'created_at'  => new sfWidgetFormDateTime(),
    ));

    $this->setValidators(array(
      'id'          => new sfValidatorPropelChoice(array('model' => 'HmgSolution', 'column' => 'id', 'required' => false)),
      'problem_id'  => new sfValidatorPropelChoice(array('model' => 'HmgProblem', 'column' => 'id')),
      'description' => new sfValidatorString(),
      'created_at'  => new sfValidatorDateTime(array('required' => false)),
    ));

    $this->widgetSchema->setNameFormat('hmg_solution[%s]');

    $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);

    parent::setup();
  }

  public function getModelName()
  {
    return 'HmgSolution';
  }


}
